import java.util.Random;

public class mainclass {

	Random random = new Random();
	int[] maxs = { 10, 10, 15, 20, 20, 10, 10, 5 };

	public int[][] getValues(int min, int max, int count) {
		random.setSeed(System.currentTimeMillis());
		int[][] values = new int[count][9];
		for (int i = 0; i < count; i++) {
			values[i][8] = random.nextInt(max - min) + min;
			float factor = values[i][8] * 0.01f;
			for (int j = 0; j < 8; j++) {
				values[i][j] = Math.round(maxs[j] * factor);
			}
			for (int k = 0; k < 6; k++) {
				while (true) {
					int col = random.nextInt(8);
					int col2 = random.nextInt(8);
					if(values[i][col]<maxs[col]*0.45||values[i][col2]==maxs[col2])
						continue;
					values[i][col] -= 1;
					values[i][col2] += 1;
					break;
				}
			}
		}
		return values;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		mainclass mc = new mainclass();
		int[][] intervalues = mc.getValues(74, 95, 12);
		for (int i = 0; i < 12; i++) {
			for (int value : intervalues[i]) {
				System.out.print(value + " ");
			}
			System.out.println();
		}
	}

}
